<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Returns an array with the supported keysizes of the opened algorithm</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mcrypt-enc-get-modes-name.html">mcrypt_enc_get_modes_name</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mcrypt-enc-is-block-algorithm-mode.html">mcrypt_enc_is_block_algorithm_mode</a></div>
 <div class="up"><a href="ref.mcrypt.html">Mcrypt 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.mcrypt-enc-get-supported-key-sizes" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mcrypt_enc_get_supported_key_sizes</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.2, PHP 5)</p><p class="refpurpose"><span class="refname">mcrypt_enc_get_supported_key_sizes</span> &mdash; <span class="dc-title">Returns an array with the supported keysizes of the opened algorithm</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.mcrypt-enc-get-supported-key-sizes-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>mcrypt_enc_get_supported_key_sizes</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$td</code></span>
   )</div>

  <p class="para rdfs-comment">
   Gets the supported key sizes of the opened algorithm.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mcrypt-enc-get-supported-key-sizes-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">td</code></em></dt>

     <dd>

      <p class="para">
       The encryption descriptor.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mcrypt-enc-get-supported-key-sizes-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an array with the key sizes supported by the algorithm
   specified by the encryption descriptor. If it returns an empty
   array then all key sizes between 1 and
   <span class="function"><a href="function.mcrypt-enc-get-key-size.html" class="function">mcrypt_enc_get_key_size()</a></span> are supported by the
   algorithm.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.mcrypt-enc-get-supported-key-sizes-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-816">
    <p><strong>Example #1 <span class="function"><strong>mcrypt_enc_get_supported_key_sizes()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;$td&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">mcrypt_module_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'rijndael-256'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'ecb'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">mcrypt_enc_get_supported_key_sizes</span><span style="color: #007700">(</span><span style="color: #0000BB">$td</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
array(3) {
  [0]=&gt;
  int(16)
  [1]=&gt;
  int(24)
  [2]=&gt;
  int(32)
}
</pre></div>
    </div>
   </div>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.mcrypt-enc-get-modes-name.html">mcrypt_enc_get_modes_name</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.mcrypt-enc-is-block-algorithm-mode.html">mcrypt_enc_is_block_algorithm_mode</a></div>
 <div class="up"><a href="ref.mcrypt.html">Mcrypt 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
